package com.jzqf.compose

import android.annotation.SuppressLint
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Add
import androidx.compose.material3.FloatingActionButton
import androidx.compose.material3.Icon
import androidx.compose.material3.Scaffold
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableIntStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.navigation.NavHostController
import com.jzqf.compose.navigation.AppNavHost
import com.jzqf.compose.ui.BottomNavigation

@SuppressLint("UnusedMaterial3ScaffoldPaddingParameter")
@Composable
fun AppLauncher(navController: NavHostController) {
    var presses by remember { mutableIntStateOf(0) }
    Scaffold(bottomBar = {
        BottomNavigation(navController)
    }, floatingActionButton = {
        FloatingActionButton(onClick = { presses++ }) {
            Icon(Icons.Default.Add, contentDescription = "Add")
        }
    }) {
        AppNavHost(navController = navController)
    }
}
